Visualizing Search Algorithms

Enter a number from 1-31 and watch how different data structures find it. Notice the number of steps each takes.

Linear Search (Array) -O(n)

Checks each element one by one from the beginning.

Binary Search (Tree) -O(log n)

Repeatedly divides the search interval in half. Requires sorted data.

Controls & Info

Linear Search Steps: 0

Tree Search Steps: 0